package com.guo.erp;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class OpenSQLite extends SQLiteOpenHelper {
	public static final String DB_NAME = "contacts.db";
	public static final int VERSION = 3;

	public OpenSQLite(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);

	}

	public OpenSQLite(Context context) {
		this(context, DB_NAME, null, VERSION);
	}

	public void onCreate(SQLiteDatabase db) {
		String sql = "CREATE TABLE contacts (id integer  ,name text PRIMARY KEY,dept text ,subdept text,telephone text,IsActive integer,GroupId text,DepartmentId text,UserId text,Position text);";
		db.execSQL(sql);
	}

	
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	
	}

}
